﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            string c = Request.QueryString["userName"];
            string d = Request.QueryString["passWord"];

            if(c!=null)Response.Write($"<h1> get==> 欢迎你，{c}，你的密码是：{d}</h1>");

            string a = null;
            string b = null;
            if (PreviousPage != null) {
                TextBox tb = (TextBox)PreviousPage.FindControl("TextBox1");
                TextBox tb2 = (TextBox)PreviousPage.FindControl("TextBox2");
                if (tb != null) {
                    a = tb.Text;
                }
                if (tb2 != null) {
                    b = tb2.Text;
                }
            }
            if(a!=null) Response.Write($"<h1> post ==> 欢迎你，{a}，你的密码是：{b}</h1>");
        }
    }
}